
package com.csc440.team2.smil;

import java.io.Serializable;


import com.csc440.team2.SmilConstants;


public class SMILComponent implements Serializable
{
    private static final long serialVersionUID = 1L;

    private int type;
    private int duration;


    /**
     * @return the type
     */
    public int getType()
    {
        return type;
    }


    /**
     * @param type the type to set
     */
    protected void setType(int type)
    {
        this.type = type;
    }


    /**
     * @return the duration
     */
    public int getDuration()
    {
        return duration;
    }


    /**
     * @param duration the duration to set
     */
    public void setDuration(int duration)
    {
        this.duration = duration;
    }


    @Override
    public String toString()
    {
        switch (type)
        {
            case SmilConstants.COMPONENT_TYPE_TEXT:
                return "Text Component";
            default:
                return "Component";
        }
    }
}
